# Xingzhong Xu added by Feb 10 2011 for SSP experiment
#CC = /opt/ssp/bin/gccssp	#uncommented if you test the SSP's compiler 
CC = ssp	#uncommented if you really compile the code
CFLAGS = dbofdm	#database name 
CPPFLAGS =
srcdir = .	#source file dir
objects =  ReadFile.o bit_rev.o GenerateData.o get_twiddle.o InsertPilot.o \
		Modulator_PN.o Random.o ReadData.o ShowProgress.o AWGN.o Channel.o Jake.o Taps_Model.o \
		ChannelEsti.o DeModulator.o Freq_Offset.o Freq_Comp.o RX.o SRFFT.o SYNC.o \
		InsertCP.o modulator.o SRIFFT.o TX.o platform.o
ofdm:	$(objects)
	#$(CC) -o ofdm $(objects) $(CFLAGS)
$(objects) : $(srcdir)/common/globaldef.h $(srcdir)/common/globalVai.h

ReadFile.o:
	$(CC) $(srcdir)/common/ReadFile.c $(CFLAGS)
bit_rev.o:
	$(CC) $(srcdir)/common/bit_rev.c $(CFLAGS)
GenerateData.o:
	$(CC) $(srcdir)/common/GenerateData.c $(CFLAGS)
get_twiddle.o:
	$(CC) $(srcdir)/common/get_twiddle.c $(CFLAGS)

InsertPilot.o:
	$(CC) $(srcdir)/common/InsertPilot.c $(CFLAGS)
Modulator_PN.o:
	$(CC) $(srcdir)/common/Modulator_PN.c $(CFLAGS)
Random.o:
	$(CC) $(srcdir)/common/Random.c $(CFLAGS)
ReadData.o:
	$(CC) $(srcdir)/common/ReadData.c $(CFLAGS)
ShowProgress.o:
	$(CC) $(srcdir)/common/ShowProgress.c $(CFLAGS)

AWGN.o:
	$(CC) $(srcdir)/channel/AWGN.c $(CFLAGS)
Channel.o:
	$(CC) $(srcdir)/channel/Channel.c $(CFLAGS)
Jake.o:	./channel/JakeType.h
	$(CC) $(srcdir)/channel/Jake.c $(CFLAGS)
Taps_Model.o:
	$(CC) $(srcdir)/channel/Taps_Model.c $(CFLAGS)

ChannelEsti.o:
	$(CC) $(srcdir)/RX/ChannelEsti.c $(CFLAGS)
DeModulator.o:
	$(CC) $(srcdir)/RX/DeModulator.c $(CFLAGS)
Freq_Offset.o:
	$(CC) $(srcdir)/RX/Freq_Offset.c $(CFLAGS)
Freq_Comp.o:
	$(CC) $(srcdir)/RX/Freq_Comp.c $(CFLAGS)

RX.o:
	$(CC) $(srcdir)/RX/RX.c $(CFLAGS)
SRFFT.o:
	$(CC) $(srcdir)/RX/SRFFT.c $(CFLAGS)
SYNC.o:
	$(CC) $(srcdir)/RX/SYNC.c $(CFLAGS)

InsertCP.o:
	$(CC) $(srcdir)/TX/InsertCP.c $(CFLAGS)
modulator.o:
	$(CC) $(srcdir)/TX/modulator.c $(CFLAGS)
SRIFFT.o:
	$(CC) $(srcdir)/TX/SRIFFT.c $(CFLAGS)
TX.o:
	$(CC) $(srcdir)/TX/TX.c $(CFLAGS)
platform.o: ./common/ShowProgress.h
	$(CC) $(srcdir)/platform.c $(CFLAGS)

.PHONY : clean
clean:
	rm -rf *.o *.original *.png *.dot ofdm
